﻿/*
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace CPPEI.Coolzon.DesignServer.Domain.Services
{
    public class FileService
    {
        /// <summary>
        /// 文件存储的路径
        /// </summary>
        public static string StoreDirectory { get;  set; }

        public static void Init(string storeDirectory)
        {
           
            StoreDirectory = storeDirectory;
            Common.Logger.InfoToTag("FileService", string.Format("文件存储的路径:{0}初始化成功.", storeDirectory));
        }

        public static string GetSolutionDir(Guid solutionId)
        {
            Common.Logger.InfoToTag("FileService", string.Format("获取方案:{0}目录成功.", solutionId));
            return string.Format("{0}{1}\\", StoreDirectory, solutionId);       
        }

        /// <summary>
        /// 创建方案目录
        /// </summary>
        /// <param name="solutionId"></param>
        public static void CreateSolutionDir(Guid solutionId)
        {
            string dir = GetSolutionDir(solutionId);
            if(!System.IO.Directory.Exists(dir))
            {
                Common.Logger.InfoToTag("FileService", string.Format("创建方案:{0}目录成功.", solutionId));
                Directory.CreateDirectory(dir);
            }
           Common.Logger.InfoToTag("FileService", string.Format("创建方案:{0}目录已存在.", solutionId));
        }

        /// <summary>
        /// 获取项的绝对路径
        /// </summary>
        /// <param name="solutionId"></param>
        /// <param name="relativePath"> 项的相对路径</param>
        /// <returns></returns>
        public static string GetItemAbsolutePath(Guid solutionId, string relativePath)
        {
           // Common.Logger.InfoToTag("FileService", string.Format("获取项的绝对路径成功,solutionId:{0},relativePathL:{1}}.", solutionId, relativePath));
            return string.Format("{0}{1}", GetSolutionDir(solutionId), relativePath);
        }

        /// <summary>
        /// 获取无变更集项的文件名
        /// </summary>
        /// <param name="itemId"></param>
        /// <returns></returns>
        public static string GetItemFileName(Guid itemId)
        {
            Common.Logger.InfoToTag("FileService", string.Format("获取无变更集项的文件名成功,itemId:{0}.", itemId));
            return string.Format("{0}", itemId);
        }
        /// <summary>
        /// 获取有变更集项的文件名
        /// </summary>
        /// <param name="itemId"></param>
        /// <param name="changeset"></param>
        /// <returns></returns>
        public static string GetItemFileName(Guid itemId, int changeset)
        {
            Common.Logger.InfoToTag("FileService", string.Format("获取有变更集项的文件名成功,itemId:{0},changeset:{1}.", itemId, changeset));
            return string.Format("{0}.{1}", itemId, changeset);
        }
    }
}

*/
